// AnalysisModelB.java
package com.sulent.frame.web.service.impl;

import com.sulent.frame.web.service.AnalysisModel;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class AnalysisModelB implements AnalysisModel {
    @Override
    public Map<String, Object> analyze(Map<String, Object> input) {
        // 模拟分析过程
        simulateDelay();
        Map<String, Object> result = new HashMap<>();
        result.put("modelB", "Result from Model B");
        return result;
    }

    private void simulateDelay() {
        try {
            // 模拟延迟
            Thread.sleep((long) (Math.random() * 2000));
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }
}